﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>节点ICON </title>
    <link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
    <script type="text/javascript" src="../../Scripts/config.js"></script>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>
    <base target="_self" />

    <script type="text/javascript" language="javascript">
        //页面启动函数.
        $(function () {
        
          var fk_flow=GetQueryString('FK_Flow');

            //初始化表格.
            $.ajax({
                type: 'post',
                async: true,
                url: Handler + "?DoType=NodesIcon_Init&FK_Flow=" + GetQueryString("FK_Flow") + "&m=" + Math.random(),
                dataType: 'html',
                success: function (data) {

                    if (data.indexOf('err@') == 0) {
                        alert(data);
                        return;
                    }

                    data = JSON.parse(data);

                    //取出来两个集合.
                    var nodes=data['Nodes'];
                    var icons=data['ICONs'];

                    for (var i = 0; i < nodes.length; i++) {

                      var node=nodes[i];

                      var newRow = "";
                        newRow = "<tr ><td class=Idx>" + i + "</td>";
                        newRow += "<td>"+node.NodeID+"</td>";
                        newRow += "<td>" + node.Name + "</td>";
                        newRow += "<td><img src='../ClientBin/NodeIcon/" + node.ICON + ".png' style='width:40px'  onerror=\"src='../ClientBin/NodeIcon/Default.jpg' \" />" + node.ICON + "</td>";
                        newRow += "<td><a href=\"javascript:Chenge('"+node.NodeID+"');\" >更换</a></td>";
                        newRow += "</tr>";

                        $("#Table1 tr:last").after(newRow);
    
                      }
                 }
            });
        });

        function Chenge(nodeID) {

            var url = 'NodesIconSelect.htm?FK_Flow=' + GetQueryString("FK_Flow") + '&FK_Node=' + nodeID;
            window.location.href = url;
        }
    </script>

    <style type="text/css">
    li 
    {
        padding:3px 0;
        }
    </style>
    
</head>
<body onkeypress="Esc();" style="font-size: smaller">
    <form method="post" id="form1">    
    <div style="margin:8px">
        <table id="Table1" style="width: 100%">
            <caption>
               节点icons维护,用户流程图、流程轨迹的显示.
            </caption>
            <tr>
                <th> 序 </th>
                <th> 节点ID </th>
                <th>名称 </th>
                <th> 现在的ICON </th>
                <th> 操作 </th>

            </tr>
        </table>
    </div>
    </form>
</body>
</html>
